
if(ESP_PLATFORM)
  file(GLOB SDK_SOURCES source/*.c source/sys/*.c source/digest/*.c source/port/ip-route.c source/port/sysdirlist.c)
  set(SDK_INCLUDES include include/port)

  file(GLOB AIO_SOURCES libaio/src/*.c source/port/aio-socket-poll.c)
  set(AIO_INCLUDES libaio/include)

  file(GLOB HTTP_SOURCES libhttp/source/*.c)
  set(HTTP_INCLUDES libhttp/include)

  file(GLOB ICE_SOURCES libice/src/*.c)
  set(ICE_INCLUDES libice/include)

  idf_component_register(SRCS ${SDK_SOURCES} ${AIO_SOURCES} ${HTTP_SOURCES} ${ICE_SOURCES}
                         INCLUDE_DIRS ${SDK_INCLUDES} ${AIO_INCLUDES} ${HTTP_INCLUDES} ${ICE_INCLUDES})

  target_compile_definitions(${COMPONENT_LIB}
          PUBLIC "-DOS_RTOS -DOS_FREERTOS")
  target_compile_options(${COMPONENT_LIB}
          PRIVATE -Wno-error=misleading-indentation -Wno-error=format-truncation= -Wno-error=stringop-overflow= -Wno-error=char-subscripts)
else()
endif()
